package com.bjpowernode.mapstruct.three;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface PayWayConvert {
    PayWayConvert convert = Mappers.getMapper(PayWayConvert.class);
    @Mappings({
            @Mapping(source = "code",target = "payWayCode"),
            @Mapping(source = "name",target="payWayName")
    })
    PayWayDto toPayWayDto(PayWay payWay);
    List<PayWayDto> toDtoList(List<PayWay> payWaysList);
}
